package com.imc.platform.base.sign.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.imc.core.utils.MysqlUtil;
import com.imc.platform.base.sign.dao.IPlatSignMapper;
import com.imc.platform.base.sign.pojo.Sign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/*
 * YT  2018/10/27 22:32
 * 方法描述：查询条件查询签到列表
 */
@Transactional
@Slf4j
@Service
public class IPlatSignServiceImpl implements IPlatSignService {

    @Autowired
    IPlatSignMapper signMapper;

    @Autowired
    MysqlUtil mysqlUtil;

    /*
     * YT  2018/10/27 22:32
     * 方法描述：查询签到初始化列表
     */
    public PageInfo <Sign> querySignList(int pageNum, int pageSize,Map <String, String> signMap) {
        PageHelper.startPage(pageNum, pageSize, true);
        PageInfo info = new PageInfo <Sign>(signMapper.querySignByMap(signMap));
        return info;
    }

    /*
     * YT  2018/10/27 22:32
     * 方法描述：查询条件查询签到列表
     */
    public PageInfo <Sign> querySignByMap(int pageNumber, int pageSize, Map <String, String> signMap) {
        PageHelper.startPage(pageNumber, pageSize, true);
        PageInfo info = new PageInfo <Sign>(signMapper.querySignByMap(signMap));
        return info;
    }

}
